<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script>
    const str = '合肥'
    console.log(encodeURI(str))
    console.log(decodeURI('%E5%90%88%E8%82%A5'))

    console.log(encodeURI('肥东&肥西'))
    console.log(encodeURIComponent('肥东&肥西'))
    console.log(decodeURIComponent('%E8%82%A5%E4%B8%9C&%E8%82%A5%E8%A5%BF'))
  </script>
</body>

</html>